<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .box{
            font-size: 16px;
            border: solid 1px #ddd;
            width: 300px;
        }
        .clip, .ellipsis{
            white-space: nowrap;
            overflow: hidden;
        }
        .clip{
            text-overflow: clip;
        }
        .ellipsis{
            text-overflow: ellipsis;
        }
    </style>
</head>
<body>
    <h1>text-overflow</h1>
    <h2>normal</h2>
    <div class="box normal">允许内容顶开或溢出指定的容器边界允许内容顶开或溢出指定的容器边界</div>

    <h2>clip</h2>
    <div class="box clip">允许内容顶开或溢出指定的容器边界允许内容顶开或溢出指定的容器边界</div>

    <h2>ellipsis</h2>
    <div class="box ellipsis">允许内容顶开或溢出指定的容器边界允许内容顶开或溢出指定的容器边界</div>
</body>
</html>